#include <stdio.h>
//实现文件拷贝

int main(int argc, char **args)
{
    if(argc < 3)
        return 0;

    FILE *p = fopen(args[1], "rb");
    if(p == NULL)
        return 0;

    FILE *p1 = fopen(args[2], "wb");
    if(p1 == NULL)
        return 0;

    while(1)
    {
        char a = 0;
        fread(&a, 1, 1, p);

        if(feof(p))
            break;
        fwrite(&a, 1, 1, p1);
    }
    fclose(p);
    fclose(p1);

    return 0;
}

